#ifndef MIDIFILE_H
#define MIDIFILE_H

#include <QString>
#include <QSharedPointer>


namespace midifile {
typedef unsigned long Dword;
typedef unsigned char Byte;
typedef unsigned short Word;
}

using namespace midifile;

class MidiFile
{

public:
    MidiFile();
    ~MidiFile();
    bool import(const QString & fileName);
    int format();
    int nTracks();
    int timeDivision();
    int isTickPerBeat();
private:
    struct Header;
    struct Track;
    struct TrackEvent;
    Header * header_;
    QList <Track*> tracks_;
    std::fstream * file_;
};

#endif // MIDIFILE_H
